package com.hehua.InterpreterPattern;

/**
 * 移动距离
 */
public class DistanceNode extends AbstractNode {
    private String distance;

    public DistanceNode(String distance) {
        this.distance = distance;
    }

    /**
     * 距离表达式的解释操作
     * @return
     */
    @Override
    public String interpret() {
        return this.distance;
    }
}
